MAKEFLAGS= --no-print-directory 

Repo=http://awk.googlecode.com/svn/branches/glee/repo
Root=$(HOME)
Bin=$(Root)/opt/glee/bin
Etc=$(Root)/opt/glee/etc
Tmp=$(Root)/tmp/glee
Safe=$(Root)/tmp/glee/safe

Dirs=$(Root)/tmp $(Tmp) $(Safe) $(Root)/opt $(Root)/opt/glee $(Bin) $(Etc)

all :  dirs bins etcs

install :
	@svn export $(Repo) repo 
	@$(MAKE) all

uninstall :
	rm -rf $(Root)/opt/glee
	rm -rf $(Tmp)

dirs :
	@mkdir -p $(Dirs)

commit :
	svn commit -m "more glee"

update :
	svn update 

etcs : $(Etc)/gleerc

$(Etc)/gleerc :
	@echo export PATH=\"$(Bin):$(HOME)/opt/gawk/bin:\$$PATH\" > $@
	@echo export GleeTmp=\"$(Tmp)\"   >> $@
	@echo export GleeSafe=\"$(Safe)\" >> $@
	@echo export AWKPATH=\"$(Bin):\$$AWKPATH\" >> $@

bins : awks

awks :
	@cd repo/awk; $(MAKE) 
